package com.it.park.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.BookService;
import com.it.park.dao.BookMapper;
import com.it.park.model.Book;

@Service("bookService")
public class BookServiceImpl extends BaseServiceImpl<Book> implements BookService {
	
	@Autowired
	private BookMapper bookMapper;

	@Override
	public boolean insert(Book book) {
		return bookMapper.insert(book)==1 ;
	}
	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return bookMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(Book record) {
		return bookMapper.insertSelective(record)==1;
	}
	@Override
	public Book selectByPrimaryKey(Integer id) {
		return bookMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(Book record) {
		return bookMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(Book record) {
		return bookMapper.updateByPrimaryKey(record)==1;
	}
	@Override
	public List<Book> selectAll() {
		return bookMapper.selectAll();
	}
	@Override
	public List<Book> selectPagination(Map<String, Object> map) {
		return bookMapper.selectPagination(map);
	}
	@Override
	public Integer selectTotal(Map<String, Object> map) {
		return bookMapper.selectTotal(map);
	}
	@Override
	public boolean updateByPrimaryKeyWithBLOBs(Book record) {
		return false;
	}
	@Override
	public List<Book> selectByList() {
		return bookMapper.selectByList();
	}
	@Override
	public List<Book> selectByUserId(Integer userId) {
		return bookMapper.selectByUserId(userId);
	}
	@Override
	public List<Book> selectPagination(Book t) {
		return null;
	}
	@Override
	public Integer selectTotal(Book t) {
		return null;
	}
	

}
